<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <!--4.键盘事件修饰符-->
  <!-- 键盘按下 -->
  <input type="text" @keydown="getMsg">
  <!-- 键盘抬起 -->
  <!--  <input type="text" @keyup="">-->
</div>


<script src="../js/vue.js"></script>
<script>
  // 1.创建Vue的实例对象
  const app = Vue.createApp({
    data(){
      return {
        count: 0,
      }
    },
    methods:{
      getMsg(event){
        console.log(event)
      }
    }
  }).mount('#app');
</script>
</body>
</html>